<html>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

window.onmessage = function(evt)
{
    if (evt.data == "setHistoryLength") {
        setHistoryLength();
        return;
    } else
        console.log("Unknown message.");
}

function setHistoryLength()
{
    console.log("Attempting to clear parent window's history object:");
    try {
        parent.window.history = "";
    } catch (e) {
        console.log("PASS: access to parent.window.history threw an exception.");
    }
    parent.window.postMessage("done", "*");
}

</script>
<body>
HELLO THERE
</body>
</html>
